package gewu.suleju.dao.iml;

import gewu.suleju.model.pojo.HouseCollection;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IHouseCollectionDao extends JpaRepository<HouseCollection,Integer> {
    HouseCollection findByUserIdAndHouseInforId(Integer userId, Integer houseInforId);
    @Transactional
    void deleteByUserIdAndHouseInforId(Integer userId, Integer houseInforId);

    List<HouseCollection> findHouseCollectionsByUserId(Integer userid);
}
